add_library(grbl INTERFACE)

target_sources(grbl INTERFACE
 ${CMAKE_CURRENT_LIST_DIR}/grbllib.c
 ${CMAKE_CURRENT_LIST_DIR}/coolant_control.c
 ${CMAKE_CURRENT_LIST_DIR}/nvs_buffer.c
 ${CMAKE_CURRENT_LIST_DIR}/gcode.c
 ${CMAKE_CURRENT_LIST_DIR}/limits.c
 ${CMAKE_CURRENT_LIST_DIR}/motion_control.c
 ${CMAKE_CURRENT_LIST_DIR}/my_plugin.c
 ${CMAKE_CURRENT_LIST_DIR}/nuts_bolts.c
 ${CMAKE_CURRENT_LIST_DIR}/override.c
 ${CMAKE_CURRENT_LIST_DIR}/planner.c
 ${CMAKE_CURRENT_LIST_DIR}/protocol.c
 ${CMAKE_CURRENT_LIST_DIR}/report.c
 ${CMAKE_CURRENT_LIST_DIR}/settings.c
 ${CMAKE_CURRENT_LIST_DIR}/sleep.c
 ${CMAKE_CURRENT_LIST_DIR}/spindle_control.c
 ${CMAKE_CURRENT_LIST_DIR}/state_machine.c
 ${CMAKE_CURRENT_LIST_DIR}/stream.c
 ${CMAKE_CURRENT_LIST_DIR}/stepper.c
 ${CMAKE_CURRENT_LIST_DIR}/system.c
 ${CMAKE_CURRENT_LIST_DIR}/tool_change.c
)

target_include_directories(grbl INTERFACE ${CMAKE_CURRENT_LIST_DIR})
